<?php
//ゾーンとエリアの計算開始
$login_auth = $login['staff_auth'];

$cellsort = $aoki_area_zone;
if ($login_auth == 'G-2' ) {
	$aja_cd   = $login['autoid'];
	$authtg2 =  "block" ;
	$forms["sort"] = '2';
	$cellsort = array();
	$cellsort = array(2 => $aoki_area_zone[2] );
	$areauser = array($aja_cd => $login['staff_id']." ".$login['staff_name'] );
}else if ($login_auth == 'G-3' ) {
	$aja_cd   = $login['autoid'];
	$authtg3 =  "block" ;
	$forms["sort"] = '3';
	$cellsort = array();
	$cellsort = array(3 => $aoki_area_zone[3] );
	$zone_name = "";
	/*
	foreach ($zoneuser as $k =>$v ){
		if ( $v["userid"] == $aja_cd ) {
			$zone_name = $v["zone_name"]."  ".$v["user_name"] ;
		}
		$zone_cd[$v["userid"]]  = $zone_name ;
	}
	*/
	$zone_cd = array($aja_cd => $login['staff_id']." ".$login['staff_name'] );
} else {
	//$zoneuser  = Class_M_OTHER::get_ajaeks_array(PLEASE_SELECT_ARR, 3);
	$areauser = array();
	$areauser =  Class_M_OTHER::get_ajaeks_array(PLEASE_SELECT_ARR, 2);
	
	$zone_cd = array();
	//$zone_cd[" "] =  PLEASE_SELECT_ARR ;
	//$zone_cd = array();
	$zone_cd = Class_M_OTHER::get_ajaeks_array(PLEASE_SELECT_ARR, 3);
	//foreach ($zoneuser as $k =>$v ){
	//	$zone_cd[$v["userid"]]  = $v["login_id"]."  ".$v["user_name"] ;
	//}
}
if ( empty($forms["sort"]) ) {
	$forms["sort"] = 2;
}

if( isset($zone_cd) )  $smarty->assign('zone', $zone_cd);
if( isset($areauser) ) $smarty->assign('areauser', $areauser);
$smarty->assign('cellsort', $cellsort );
//ゾーンとエリアの計算終了
?>